Calgary Crime Analysis

Lin Chen

Part 1. Introduction
Part 2. Data Wrangling
Part 3. Data Analysis
Part 4. Conclusion

Part 1. Introduction

Step 1. Research Motivation
Step 2. Guiding Questions

Step 1. Research Motivation

As newly admitted graduate students at the University of Calgary, safety issues could be one of the most significant concerns, since we may have lots of questions associated to our daily lives and public safety, such as:

Where to live?
Where to go shopping?
Which time and where to hang out at night…

Therefore, conducting detailed research about community crime statistics could be both reasonable and useful for new residents to discover the city and make safe choices.

Step 2. Guiding Questions

All our guiding questions can be divided into four categories:

1. Time-related:
Which time in a year is relatively safe?
Is Calgary becoming a safer place during recent years?

2. Location-related:
Which area in Calgary is relatively safe?
Which area in Calgary is relatively unsafe?
How unsafe is the downtown area, what's the major crime specie here?

3. Crime-related:
What are general categories for crime records in Calgary?
What kind of crime happened most frequently?
How can we correctly measure safety level by using crime data?

4. Advanced-level:
Can I have an crime map? Better to be an interactive one.
Can I use animation to show how safety level changes by both location and time?

Python Libraries Used:

Numpy, Pandas, Matplotlib, GeoPandas, Geoplot, Plotly, Folium, etc.

Part 2. Data Wrangling

Step 1. Data Gathering
Step 2. Data Assessing
Step 3. Data Cleansing
Step 4. Data Storing

Step 1. Data Gathering

Data Source: https://data.calgary.ca/Health-and-Safety/Community-Crime-and-Disorder-Statistics-to-be-arch/848s-4m4z

Click 'Export' on the top right part of webpage, and choose 'CSV' format to download. This tabular dataset includes category, time, location and other information for Calgary crimes from 2012-2019, and needs to be cleaned.

Data License: https://data.calgary.ca/stories/s/Open-Calgary-Terms-of-Use/u45n-7awa

Free to copy, modify, publish, translate, adapt, distribute or use the Information in any medium.